package cn.ys.org.domain;

import java.util.Date;
import java.util.List;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.ys.base.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;

/**
 * <p>
 *
 * </p>
 *
 * @author ys
 * @since 2022-12-26
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Shop extends BaseDomain{

    @NotBlank(message = "名字不能为空")
    @Excel(name = "店铺名称", orderNum = "1", width = 30, isImportField = "true_st")
    private String name;
    @NotBlank(message = "电话不能为空")
    @Excel(name = "店铺电话", orderNum = "2", width = 30, isImportField = "true_st")
    private String tel;
    @Excel(name = "创建时间", orderNum = "3", width = 30, isImportField = "true_st", format = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date registerTime;
    /**
     * 店铺状态：0待审核，1以审核，-1驳回，2待激活
     */
    @Excel(name = "店铺状态", replace = {"待审核_0","已审核_1","驳回_2","已激活_3"}, orderNum = "4", width = 30, isImportField = "true_st")
    private Integer state;
    @NotBlank(message = "地址不能为空")
    @Excel(name = "店铺地址", orderNum = "5", width = 30, isImportField = "true_st")
    private String address;
    @NotBlank(message = "logo不能为空")
    @Excel(name = "店铺logo", orderNum = "6", width = 30, isImportField = "true_st")
    private String logo;
    private Long adminId;

    // 店铺入驻
    @Valid
    private Employee admin;

    private String adminName;

    // 日志集合
    private List<ShopAuditLog> auditLogs;

}
